function diff = theta_fun( G, region, param)

    if strcmp(region, 'N')
        gamma_1=param.gamma_N_1;
        gamma_2=param.gamma_N_2;
    elseif strcmp(region, 'R') 
        gamma_1=param.gamma_R_1;
        gamma_2=param.gamma_R_2;    
    end

    diff = (G.^gamma_2-G)./(G.^gamma_2-G.^gamma_1);

end